package com.util;

public class RuntimeSettings {
//	public static final String "Student_Info";
	public static final String VERSION_ID = " version 0.1"
			+ " dated October 8, 2011";
	public static final String SERVER_IP = "localhost";
	static String databaseName = "ebay";
	static String dbUserID = "root";
	static String dbPassword = "root";
	public static String RUN_MODE = "Test"; // "Test"; // "TestSMS", //
											// "Production"; //
	public static boolean IS_IN_DEBUG_MODE = true; // false; //
	public static int ROWS_IN_PAGE = 10;
	static int portNo = 3306;// 5432; //
	public static String TEST_DIRECTORY = "D:/TaxiManagementDev/test/"; // "D:/working/TaxiManagementNew/test/";
																		// //
																		// "D:/working/GeoSynch/Test/";
	public static String DB_DIRECTORY = "/DB/";
	public static String scriptSql[] = {
			" use ebay;",
			
			"DROP TABLE IF EXISTS listingdetail;",
			"DROP TABLE IF EXISTS buyer;",
			"DROP TABLE IF EXISTS shipping;",
			"DROP TABLE IF EXISTS product;",
			"DROP TABLE IF EXISTS subcategory;",
			"DROP TABLE IF EXISTS category;",
			"DROP TABLE IF EXISTS bank;",
			"DROP TABLE IF EXISTS register;",
			"DROP TABLE IF EXISTS countrycode;",
			"DROP TABLE IF EXISTS secretquestion;",
			
			"CREATE TABLE category(catid int(10) NOT NULL ,catname varchar(100),description varchar(500) NOT NULL, PRIMARY KEY(catid));",
			"CREATE TABLE subcategory(subcatid int(10) NOT NULL ,subcatname varchar(100),catid int(10),PRIMARY KEY(subcatid),FOREIGN KEY(catid) REFERENCES category(catid));",

			"CREATE TABLE register(id int(10) unsigned NOT NULL AUTO_INCREMENT,firstname varchar(50),lastname varchar(50),homeaddress varchar(100), city varchar(50), state varchar(50),pincode varchar(30), country varchar(50), phoneno varchar(30), email varchar(30), ebayuserid varchar(50) NOT NULL, password varchar(50) NOT NULL, secretques varchar(100), answer varchar(50), dob varchar(30),active int(10),PRIMARY KEY (id),UNIQUE KEY(ebayuserid));",
			"CREATE TABLE product(prodid int(10) unsigned NOT NULL AUTO_INCREMENT ,title varchar(100),cond varchar(100),pic varchar(400),description varchar(500),start_price decimal(8,2),buy_itnow_price decimal(8,2),quantity int(10),duration varchar(50),listingtime varchar(50),listingdate date,payment_method varchar(100),subcatid int(10),id int(10) unsigned,PRIMARY KEY(prodid),FOREIGN KEY(subcatid) REFERENCES subcategory(subcatid),FOREIGN KEY(id) REFERENCES register(id));",
			"CREATE TABLE shipping(shippingid int(10) unsigned NOT NULL AUTO_INCREMENT,shipping_service varchar(50),shipping_cost decimal(8,2),free_shipping varchar(50),handling_time varchar(50),prodid int(10) unsigned,id int(10) unsigned, PRIMARY KEY(shippingid),FOREIGN KEY(prodid) REFERENCES product(prodid) ,FOREIGN KEY(id) REFERENCES register(id))",
			"CREATE TABLE bank(bankid  int(10) unsigned NOT NULL AUTO_INCREMENT ,payeename varchar(100),accntno int(20),bankname varchar(100),city varchar(100),branch varchar(100),mcir int(10),creditcardno int(20),month varchar(50),year int(10),cardholder varchar(50),cvv int(10),balance decimal(12,3),PRIMARY KEY(bankid));",
			"CREATE TABLE buyer(bid  int(10) unsigned NOT NULL AUTO_INCREMENT ,buyerid int(10) unsigned ,prodid int(10) unsigned,addtocart int(10),buyitnow int(10),auction int(10),auctionprice decimal(12,3),PRIMARY KEY(bid),FOREIGN KEY(prodid) REFERENCES product(prodid),FOREIGN KEY(buyerid) REFERENCES register(id));",
			
			"CREATE TABLE listingdetail(lstid int(10) unsigned NOT NULL AUTO_INCREMENT,prodid int(10) unsigned ,status int(10),PRIMARY KEY(lstid),FOREIGN KEY(prodid)REFERENCES  product(prodid));",
			
			"insert into category(catid,catname,description) values(1,'','');",
			"insert into category(catid,catname,description) values(2,'Books & Magazines','Variety of books and magazines');",
			"insert into category(catid,catname,description) values(3,'Cameras & Optics','Different variety of cameras and optics');",
			"insert into category(catid,catname,description) values(4,'Consumer Electronics','Variety of electronic items');",
			
			
			"insert into subcategory(subcatid,subcatname,catid) values(1,'AudioBooks',2);",
			"insert into subcategory(subcatid,subcatname,catid) values(2,'Fiction',2);",
			"insert into subcategory(subcatid,subcatname,catid) values(3,'Entertainment',2);",
			
			"insert into subcategory(subcatid,subcatname,catid) values(4,'Digital SLR',3);",
			"insert into subcategory(subcatid,subcatname,catid) values(5,'Compact Digital',3);",
			"insert into subcategory(subcatid,subcatname,catid) values(6,'Long Zoom',3);",
			
			"insert into subcategory(subcatid,subcatname,catid) values(7,'Apple Ipod',4);",
			"insert into subcategory(subcatid,subcatname,catid) values(8,'Electronic Gadgets',4);",
			"insert into subcategory(subcatid,subcatname,catid) values(9,'Home Appliances',4);",
			
/////////////////////////////////////////////////////////////////////
			
			"CREATE TABLE countrycode(cid int(10) unsigned NOT NULL AUTO_INCREMENT,countryname varchar(100), PRIMARY KEY(cid));",
			"CREATE TABLE secretquestion(sid int(10) unsigned NOT NULL AUTO_INCREMENT,secretques varchar(100), PRIMARY KEY(sid));",
			"INSERT INTO  countrycode(countryname) VALUES('INDIA');" ,
			"INSERT INTO  countrycode(countryname) VALUES('AFGHANISTAN');" ,
			"INSERT INTO  countrycode(countryname) VALUES('CHINA');" ,
			"INSERT INTO  countrycode(countryname) VALUES('CANADA');" ,
			"INSERT INTO  countrycode(countryname) VALUES('JAPAN');",
			"INSERT INTO  secretquestion(secretques) VALUES('What is your favourite food?');",
			"INSERT INTO  secretquestion(secretques) VALUES('Which is your favourite place?');",
			"INSERT INTO  secretquestion(secretques) VALUES('Who is your favourite cricketor?');",
			"INSERT INTO  secretquestion(secretques) VALUES('Where you were born?');" };
}
